<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>
    <!--<button id="btn" onclick="clik()">点击一下</button>-->
    <button id="btn">点击一下</button>
</body>
<script>
    var btn = document.getElementById('btn')
    btn.onclick = function () {
        alert('点我干嘛')
    }

    // btn.onclick = clik
    // function clik() {
    //     alert('不要点')
    // }
</script>
</html>